﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using Microsoft.Practices.Unity;
using WcfRiaServices.Extensions;
using Fdd.Aspen.Services.Web;
using Fdd.Aspen.DomainModel.Repositories;
using Fdd.Aspen.Repositories;
using Fdd.Aspen.Infrastructure.Data;
using System.Configuration;
using Fdd.Aspen.DomainModel.Entities;
using Fdd.Aspen.Client.Web.Configuration;
using System.ServiceModel.DomainServices.Server;

namespace Fdd.Aspen.Client.Web
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            //AutoMapperConfiguration.Configure();
            UnityContainerConfiguration.Configure();

            DomainService.Factory = new UnityDomainServiceFactory(UnityContainerConfiguration.Container);
        }


        private string AspenConnectionString
        {
            get { return ConfigurationManager.ConnectionStrings["AspenConnectionString"].ConnectionString; }
        }


        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}